﻿using System.Text.RegularExpressions;

namespace PLM.ConfigurationCenter.Core.Util;

public class RegexHelper {
    /// <summary>
    /// 
    /// </summary>
    public static Regex OracleRegex => new Regex(@".*HOST=([^\)]+).*PORT=([^\)]+).*SERVICE_NAME=([^\)]*).*.*User\s+Id=([^;]*).*Password=([^;]*).*");
    /// <summary>
    /// 
    /// </summary>
    public static Regex SqlServerRegex => new Regex(".*Source=([^;]*).*Catalog=([^;]*).*User\\s*ID=([^;]*).*Password=([^;]*).*");
    /// <summary>
    /// 
    /// </summary>
    public static Regex PgSqlRegex => new Regex(@".*PORT=([^;]*).*DATABASE=([^;]*).*HOST=([^;]*).*PASSWORD=([^;]*).*USER\s+ID=([^;]*).*");
}